﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.ViewModel;
using System.Collections.ObjectModel;

namespace HSE
{
    public class DefaultViewModel : NotificationObject
    {
        private ObservableCollection<Message> _messages;
        public ObservableCollection<Message> Messages
        {
            get
            {
                return this._messages;
            }

            set
            {

                this._messages = value;
                this.RaisePropertyChanged("Messages");
            }
        }

        private string _tipinfo;
        public string TipInfo
        {
            get
            {
                return this._tipinfo;
            }

            set
            {

                this._tipinfo = value;
                this.RaisePropertyChanged("TipInfo");
            }
        }

        public DefaultViewModel()
        {
            ObservableCollection<Message> temps = new ObservableCollection<Message>(); 
            temps.Add(new Message() { Notice = "HSE 方针： 全员负责，预防为主，以人为本，绿色发展。" });
            temps.Add(new Message() { Notice = "HSE愿景：平安华北，幸福家园" });
            temps.Add(new Message() { Notice = "核心价值观：安全高于一切，生命最为宝贵；保护环境就是保护企业的明天。" });
            temps.Add(new Message() { Notice = "管理理念：我们不希望任何人受到伤害；好的甲方能管理出好的乙方。" });
            temps.Add(new Message() { Notice = "基层HSE管理“六要”：工作责任要逐岗明确，岗位风险要逐个告知，防范措施要逐条落实，安全隐患要逐一整改，考核奖惩要逐人兑现，经验教训要逐案总结" });
            this.Messages = temps;
        }
    }

    public class Message : NotificationObject
    {
        private string _notice;

        public string Notice {

            get
            {
                return this._notice;
            }

            set
            {

                this._notice = value;
                this.RaisePropertyChanged("Notice");
            }
        }

        private string _image;

        public string Image
        {
            get
            {
                return this._image;
            }

            set
            {

                this._image = value;
                this.RaisePropertyChanged("Image");
            }
        }

    }
}
